package com.xnyzc.lhy.common.penum.work;

/**
 * @Description 打卡状态（0：早退或迟到、1：正常、2：缺卡）
 * @Author zhuyubin
 * @Date 2019-08-19 19:16
 **/
public enum EPunchStatus {

    earlyOrLate(0, "早退或迟到"),
    normal(1, "正常"),
    missingCard(2, "缺卡");

    private Integer type;
    private String desc;

    EPunchStatus(Integer type, String desc){
        this.type = type;
        this.desc = desc;
    }

    public static EPunchStatus findById(Integer type) {
        EPunchStatus[] values = EPunchStatus.values();
        for (EPunchStatus value : values) {
            if (value.type.equals(type)) {
                return value;
            }
        }
        return null;
    }
    public Integer getType() {
        return this.type;
    }

    public String getDesc() {
        return this.desc;
    }
}
